package com.example.springrabbitmq.listener;

import com.example.springrabbitmq.constant.Constants;
import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

//@Component
public class SimpleListener {
    @RabbitListener(queues = Constants.SIMPLE_QUEUE)
    public void simpleListener(Message message) {
        System.out.println("listener 从队列 " + Constants.SIMPLE_QUEUE +" 中接收到消息：" + message);
    }
}
